package com.zqx.saller.service;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 签名服务
 */
@Service
public class SignService {

    static Map<String,String> PUBLIC_KEYS = new HashMap<>();

    static {
        PUBLIC_KEYS.put("1000","MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4qo3LyAFswrTQB1cF+TMg6ybX\n" +
                "/XVrTWGPlSNLlM0xKQ3daOMHvpjZ86f3Gsrr/lHjkfFEe3EnrM2kGt0+Xs4uNx11\n" +
                "uj+v1JzHneSGtZIQr4ixInRbC7hnogAXaNB87bAUyje5yPORYoAEFqyYDb9cevMY\n" +
                "j9STwYR57sDglLRB8QIDAQAB");
    }

    /**
     * 根据授权编号获取公钥
     * @param authId
     * @return
     */
    public String getPublickey(String authId){
        return PUBLIC_KEYS.get(authId);
    }
}
